package com.ytf.test.third;

/**
 * @author: YTF
 * @date: 2024/9/13 16:23
 * @version: 1.0
 * @description: 类型转换操作符
 */
public class Casting {
    public static void main(String[] args) {
        int i = 200;
        long l = (long)i;
        l = i;
        l = 200;
        i = (int)l;
        /**
         * 总结
         *  向上转换编译器在必要的时候会自动进行
         *  向下转换必须强制转换，有丢失信息的危险
         */
    }
}
